import os
from pathlib import Path

# API配置
DASHSCOPE_API_KEY = os.getenv("DASHSCOPE_API_KEY", "sk-211f03cfc85340af834cca20b5dfe919")  # 通义千问API密钥

# 模型配置
TEXT_MODEL = "qwen-max"  # 文本模型
MULTIMODAL_MODEL = "qwen-vl-plus"  # 多模态模型
EMBEDDING_MODEL = "text-embedding-v4"  # 向量嵌入模型

# 文件路径配置
BASE_DIR = Path(__file__).parent.absolute()
DATA_DIR = BASE_DIR / "data"
PDF_DIR = DATA_DIR / "pdfs"
VECTOR_DB_DIR = DATA_DIR / "vectordb"
MEMORY_DIR = DATA_DIR / "memory"
UPLOADS_DIR = DATA_DIR / "uploads"

# 确保目录存在
for dir_path in [DATA_DIR, PDF_DIR, VECTOR_DB_DIR, MEMORY_DIR, UPLOADS_DIR]:
    dir_path.mkdir(exist_ok=True, parents=True)

# 应用配置
APP_HOST = "0.0.0.0"
APP_PORT = 8000
DEBUG = True
